html,body{
    background-color: #aaa;
    height: 100%;
    margin: 30px;
}

#captcha {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.pi-captcha {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 80px;
    min-height: 80px;
    background-color: #fff;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.8;
    user-select: none;
    box-shadow: 0 0 10px 0 rgba(0,0,0,.1);
    transition: cubic-bezier(0.075, 0.82, 0.165, 1) 0.4s;
}

.pi-captcha-container {
    width: 360px;
    /* height: 360px; */
    padding: 10px;
    box-sizing: border-box;
}

.pi-captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
}

.pi-captcha-close,
.pi-captcha-refresh {
    cursor: pointer;
    color: #999;
}

.pi-captcha-title {
    font-size: 1.2em;
    color: #333;
}

.pi-captcha-image {
    position: relative;
}

.pi-captcha-refer {
    position: relative;
    z-index: 1;
    width: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    opacity: 1;
    background-position: 0 0;
    height: var(--decoration-height);
    background-image: var(--decoration-image);
}

.pi-captcha-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.shake {
    animation: shake 0.5s;
}

.pi-captcha-submit {
    cursor: pointer;
    background-color: #4CAF50;
    color: #fff;
    padding: 4px 16px;
    border-radius: 4px;
    transition: cubic-bezier(0.075, 0.82, 0.165, 1) all .3s;
}

.pi-captcha-submit:active {
    background-color: #3e8e41;
}

.pi-captcha-submit:hover {
    opacity: 0.8;
}

@keyframes shake {
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(-2px);
    }
}

.pi-captcha-loading {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    color: #777;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.8);
}

.pi-captcha-loading .pi-captcha-loading-icon { 
    display: block;
}

.pi-captcha-loading .pi-captcha-success { 
    display: none;
}

.pi-captcha-loading-success .pi-captcha-loading-icon { 
    display: none;
}

.pi-captcha-loading-success .pi-captcha-success { 
    display: block;
    color: #4CAF50;
    font-size: 1.2em;
    text-align: center;
}

.pi-captcha-input {
    display: none;
    margin-top: 10px;
}

.pi-captcha-input-draggable {
    position: relative;
    height: 3em;
    overflow: hidden;
}

.pi-captcha-input-item {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    box-sizing: border-box;
    border: 1px solid #ccc;
    background-color: #eee;
    width: 100%;
    height: 100%;
}

.pi-captcha-input-drag {
    cursor: grab;
    position: absolute;
    left: 1px;
    top: 1px;
    z-index: 3;
    width: 4rem;
    height: calc(100% - 2px);
    background-color: #fff;
    box-sizing: border-box;
    border: 1px solid #ccc;
    transform: translateX(var(--x));
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ccc;
}

.pi-captcha-input-drag::after {
    content: '';
    position: absolute;
    top: 0;
    right: calc(100% + 2px);
    z-index: 0;
    width: 2000%;
    height: 100%;
    background-color: #4CAF50;
}

.pi-captcha-set-drag {
    position: absolute;
    top: 1px;
    left: 1px;
    z-index: 3;
    width: 4rem;
    background-color: #fff;
    border: 1px solid #fff;
    box-sizing: border-box;
    height: calc(100% - 2px);
    transform: translateX(var(--x));
}

.pi-captcha-input-item-helper {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    color: #aaa;
}

.pi-captcha-set-rotate {
    width: 8em;
    height: 8em;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) rotate(var(--r));
    text-align: center;
}

.pi-captcha-set-click {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.pi-captcha-set-clicker {
    position: absolute;
    top: var(--y);
    left: var(--x);
    background: #5d5def;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    color: #fff;
    text-align: center;
    transform: translate(-50%, -50%);
    line-height: 19px;
    font-size: 12px;
    font-weight: 800;
}

.pi-captcha-set-clicker::after {
    content: attr(data-index);
}
